package kr.co.icebird.spring3.config.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.MessageSourceAccessor;

public class ExcelBuilder {

	@Autowired
	private MessageSourceAccessor messageSourceAccessor;
	
	private String xlsTempPath 	= messageSourceAccessor.getMessage("FILE.TEMP.PATH", "C:/temp/");
	private String xlsExtend 	= messageSourceAccessor.getMessage("FILE.XLS.EXTENSION", "xls");
	private String pngExtend 	= messageSourceAccessor.getMessage("FILE.XLS.EXTENSION", "png");
	
	public String createExcel(Map param) {
		SimpleDateFormat format = new SimpleDateFormat("yyyyMMddhh24mmss");
		Calendar cal = Calendar.getInstance();
		String fileName = format.format(cal.getTime());
		fileName = xlsTempPath+fileName+xlsExtend;
		System.out.println(fileName);
		return "";
	}
}
